<?php
namespace app\validate;

use think\Validate;

class CheckRole extends Validate
{
    protected $rule =   [
        'rolename'  => 'require|length:1,50|chsDash',
    ];

    protected $message  =   [
        'rolename.require' => '名称不能为空！',
        'rolename.length' => '名称长度不能超过50个字符！',
        'rolename.chsDash' => '名称只能是汉字、字母、数字和下划线_及破折号-',
    ];

}